package com.jiangfeixiang.springbootswgger2api.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by jiangfeixiang on 2018/8/28
 */
 @Configuration
public class DruidDBConfig {
    private Logger logger = LoggerFactory.getLogger(DruidDBConfig.class);

    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
   public DruidDataSource druidConfig(){

       return new DruidDataSource();
   }
}
